<?php
use_helper('Global', 'Date');
?>

<div id="workorders">
<?php foreach ($pager->getResults() as $workorder): ?>
<div class="wo-line">
  <div class="wo-number">
  	<?php echo $workorder->getNumber();?>
  </div>
  <div class="wo-name">
	<?php echo link_to ($workorder->getName(), "workorder/show?id=".$workorder->getId()); ?>
	for <?php echo link_to ($workorder->getCompany(), "company/show?id=".$workorder->getCompanyId(),'class="small"'); ?>
	<span>
		Project Manager: <?php echo $workorder->getUserRelatedByPmId()?>
		Technical: <?php echo $workorder->getUserRelatedByTechId()?> </span>
  </div>
  <div class="wo-date">
  	<?php echo format_date($workorder->getUpdatedOn(),'F' ); ?>
  </div>
</div>
<?php endforeach; ?>
</div>
<div class="clear"></div>
<div class="pager">
  <?php echo pager_navigation($pager, 'workorder/list') ?>
</div>
